/*
 * Copyright 2007 Matt Jensen
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */
package org.jtell.config.annotation;

import org.jtell.config.Configuration;
import org.jtell.config.ConfigurationSource;
import org.jtell.internal.config.annotation.AnnotationConfiguration;

/**
 * <p>
 * <code>AnnotationConfigurationSource</code> is an implementation of the {@link ConfigurationSource} interface which
 * reads configuration information from Java annotations on application listener classes.
 * </p>
 * <p>
 * Because we cannot enumerate all application listener classes at initialization time, class examination must be
 * deferred until the first time a listener of any class is registered. Therefore all of the heavy lifting for this 
 * configuration type is handled by its associated {@link Configuration} implementation,
 * {@link AnnotationConfiguration}.
 * </p>
 * <p>
 * <strong>Thread Safety</strong><br/>
 * Instances of this class are safe for multithreaded access. 
 * </p>
 *
 * @see AnnotationConfiguration
 */
public class AnnotationConfigurationSource implements ConfigurationSource
{
    /**
     * <p>
     * Construct a {@link AnnotationConfigurationSource} instance.
     * </p>
     */
    public AnnotationConfigurationSource()
    {
        super();
    }

    /* inherit javadoc */
    public Configuration getConfiguration()
    {
        return new AnnotationConfiguration();
    }
}
